/**
 * Created by eku_mac on 9/5/17.
 */
import { Action } from '@ngrx/store';
// import { CustomAction } from './base.actions';



export class AuthActions {
  static LOGIN          = 'LOGIN';
  static LOGIN_SUCCESS  = 'LOGIN_SUCCESS';
  static LOGOUT         = 'LOGOUT';
  static LOGOUT_SUCCESS = 'LOGOUT_SUCCESS';
  static AUTHORIZE      = 'AUTHORIZE';
  static SIGNUP         = 'SIGNUP';

  authorize(): Action {
    return { type: AuthActions.AUTHORIZE };
  }

  login(): Action {
    return { type: AuthActions.LOGIN };
  }

  loginSuccess(): Action {
    return { type: AuthActions.LOGIN_SUCCESS};
  }

  logout(): Action {
    return { type: AuthActions.LOGOUT };
  }

  logoutSuccess(): Action {
    return { type: AuthActions.LOGOUT_SUCCESS };
  }

  signupSuccess(): Action {
    return { type: AuthActions.SIGNUP };
  }

}
